package es.esp.ut10;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class Test {

	public static void imprimir(Collection coleccion){
		Iterator iterador = coleccion.iterator();
		while (iterador.hasNext())
			System.out.println(iterador.next());
	}

	
	public static void main(String[] args) {
		Collection <Integer> lista = new ArrayList<Integer>(); 
		Object[] tabla;
		
		// ...
		
		for(int i=0; i<10; i++)
			lista.add(i);
		
		imprimir(lista);
		
		tabla = (Object[]) lista.toArray();
		
	
	}

}
